@font-face {
  font-family: Hasklig;
  font-weight: 400;
  font-style: normal;
  src: url(/style/fonts/Hasklig-Regular.otf) format("opentype");
}

@font-face {
  font-family: Hasklig;
  font-weight: 400;
  font-style: italic;
  src: url(/style/fonts/Hasklig-It.otf) format("opentype");
}

@font-face {
  font-family: Hasklig;
  font-weight: 700;
  font-style: normal;
  src: url(/style/fonts/Hasklig-Bold.otf) format("opentype");
}

@font-face {
  font-family: Hasklig;
  font-weight: 800;
  font-style: italic;
  src: url(/style/fonts/Hasklig-BoldIt.otf) format("opentype");
}

@ui-background: rgb(245, 245, 245);
@ui-background-bright: lighten(@ui-background, 20%);
@ui-background-dark: darken(@ui-background, 20%);
@ui-background-accent: rgb(198, 207, 223);
@ui-sidebar-header: rgb(226, 230, 236);
@ui-border:     rgb(225, 225, 225);
@ui-border-light: #efefef;
@ui-border-dark: darken(@ui-border, 20%);
@ui-selected:   rgb(67, 104, 234);
@ui-text:       rgb(50, 60, 68);
@code-fonts:    'Hasklig', 'Fira Code', 'Menlo', fixed;

@toolbar-height: 68px;
@cell-margin-width: 6em;
@cell-left-border-width: 8px;
@tab-view-height: 1.5em;
@tab-view-height-plus-padding: 2.5em;

@line-highlight-color: rgba(253, 246, 227, 1.0);

body {
  font-family: 'Helvetica Neue', 'Segoe UI', sans-serif;
  font-size: 10pt;
  margin: 0;
  padding: @toolbar-height 0 0;
}

#Logo {

}

.toolbar-container {
  height: @toolbar-height;
  background: @ui-background;
  border-bottom: 1px solid @ui-border;
  color: @ui-text;
  z-index: 2;

  user-select: none;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  .text {
    display: none;
  }

  &.editing-text .text {
    display: block;
  }

  .code {
    display: none;
  }

  &.editing-code .code {
    display: block;
  }

  .toolbar.about {
    float: right;
  }

  .floating-menu {
    border: 1px #c2c2c2 solid;
    background: white;
    position: absolute;
    display: none;
    padding: 4px;
    user-select: text;
  }

  .toolbar {
    //min-width: 120px;
    float: left;
    height: 54px;
    margin: 8px 0;
    padding: 0 12px;

    border-right: 1px solid @ui-border;
    &:last-child {
      border-right: none;
    }

    h3 {
      position: absolute;
      bottom: 6px;
      font-size: 100%;
      font-weight: normal;
      line-height: 1em;
      height: 1em;
      margin: 0;
      color: @ui-text;
      opacity: 0.6;
      text-shadow: black;
      text-transform: capitalize;

      select {
        margin-left: 1em;
      }
    }

    //.tool-group {
    //  height: 35px;
    //  line-height: 35px;
    //  white-space: nowrap;
    //  display: inline-block;
    //  vertical-align: middle;
    //  * {
    //    vertical-align: middle;
    //  }
    //
    //  & > button {
    //    height: 35px;
    //    display: inline-block;
    //  }
    //}

    .tool-group {
      height: 28px;
      line-height: 28px;
      //border-left: 1px solid @ui-border;
      padding: 0 12px;
      white-space: nowrap;
      display: inline-block;
      vertical-align: middle;
      position: relative;
      * {
        vertical-align: middle;
      }

      &:first-of-type {
        border-left: none;
        padding-left: 0;
      }

      &:last-of-type {
        padding-right: 0;
      }

      & > button {
        width: 26px;
        height: 26px;
        padding: 0;
        line-height: 1;
        font-size: 14px;
        display: inline-block;
      }
    }

    .tool-group::before {
      content: ' ';
      position: absolute;
      left: 0;
      top: 6px;
      bottom: 0;
      border-left: 1px solid @ui-border;
    }

    .tool-group:first-of-type::before {
      border: none;
      display: none;
    }
  }
}

.dropdown {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;

  &.open {
    background-color: white;
    border-radius: 4px;
  }

  .marker {
    position: absolute;
    right: 0;
    top: 0;
    width: 1em;
    height: 2em;
    line-height: 2em;
    user-select: none;
    z-index: 3;
  }

  button {
    height: 0;
    width: auto;
    padding: 0 2em 0 1em;
    visibility: hidden;
    overflow: visible;
    display: block;
    border-width: 0 1px;
    font-size: 12px;
    background: white;
    border-color: transparent @ui-border;
    border-radius: 0;
  }

  button.selected, &.open button {
    padding: .5em 2em .5em 1em;
    line-height: 1;
    width: auto;
    height: auto;
    text-align: left;
    border-width: 1px;
    opacity: 1;
    visibility: visible;
  }

  button.selected, button:hover {
    border-radius: 4px;
    border-color: @ui-border;
  }

  &.open button:enabled {
    border-radius: 0;
    border-color: transparent @ui-border;

    &:first-of-type, &.first-visible {
      border-top-left-radius: 4px;
      border-top-right-radius: 4px;
      border-top-color: @ui-border;
    }

    &:last-of-type, &.last-visible {
      border-bottom-left-radius: 4px;
      border-bottom-right-radius: 4px;
      border-bottom-color: @ui-border;
    }
  }

  &.open button:disabled {
    display: none;
  }

  &.open button:hover {
    background-color: @ui-selected;
    color: white;
  }
}

.new-cell-divider {
  height: 0.5em;
  text-align: center;
  line-height: 0.5em;
  padding-top: 1px; // correct '+' location
  white-space: pre;
  font-family: 'Hasklig', 'Fira Code', 'Menlo', fixed;
  margin-left: @cell-left-border-width;

  &:hover {
    background: rgba(48, 113, 169, 0.09); // zep's color ;-)

    &:after {
      content: '+';
    }
  }
}

.cell-container {
  border-radius: 6px;
  border: 1px solid transparent;
  border-left-width: @cell-left-border-width;
  position: relative;

  &.selected, &.active {
    border-radius: 6px;
    border: 1px solid @ui-selected;
    border-left-width: 8px;
    //box-shadow: -1px 1px 3px 0px rgba(0, 0, 0, 0.5);
  }

  &.running {
    border-color: green;
  }

  &.queued {
    border-color: gray;
  }

  &.error {
    border-color: #ba0000;
  }

  .cell-input {
    position: relative;

    grid-area: input;


    .cell-input-tools {
      background: @ui-background;
      box-sizing: border-box;
      display: grid;
      font-size: 11pt;
      grid-template-areas: "button label lang options exec-info";
      grid-template-columns: min-content 10ch min-content 2fr 1fr;
      grid-template-rows: min-content;
      border-bottom: 1px solid @ui-border;

      button {
        line-height: 1;
        background-size: 12px 12px;
        background-position: 90% 90%;
        font-size: inherit;
        padding: .5em 1ch;
        &.toggle-output img {
          vertical-align: middle;
        }
      }

      .run-cell {
        //padding: 0 4px;
        grid-area: button;
      }

      button.run-cell.refresh .icon {
        font-size: 8px;
      }

      .cell-label {
        font-family: @code-fonts;
        text-align: left;
        font-size: inherit;
        grid-area: label;
        padding: .5em 1ch;

        &:before {
          content: 'In(';
        }
        &:after {
          content: '):';
        }
      }

      .lang-selector {
        grid-area: lang;
        display: flex;
        align-items: center;
      }

      .options {
        grid-area: options;
        text-align: left;
        padding-left: 1em;

        .toggle-code {
          font-weight: 900;
          font-family: @code-fonts;
          padding: .5em;
        }
      }

      .exec-info {
        text-align: right;
        font-style: italic;
        font-size: 8pt;
        color: #808080;
        padding: 5.5pt;
        line-height: 11pt;
        display: none;
        grid-area: exec-info;

        &.output {
          display: block;
        }

        .exec-start::before {
          content: "Ran on ";
        }
        .exec-start::after {
          content: " took ";
        }

        &.running {
          .exec-start::before {
            content: "Started at ";
          }
          .exec-start::after {
            content: " running for ";
          }
        }
      }
    }

    .cell-input-editor {
      padding: 3pt;
      overflow: hidden;
    }

    .cell-footer {
      display: none;
      grid-template-columns: [vim] auto [exec-info] max-content;
      grid-template-rows: auto;
      padding: 2px 4px 2px 4px;
      line-height: 1.5;
      font-size: 11pt;
      border-top: 1px dashed @ui-border;
    }

    .vim-status {
      white-space: pre;
      font-family: 'Hasklig', 'Fira Code', 'Menlo', fixed;

      &.hide {
        display: none !important;
      }
    }
  }

  &.code-cell:hover .cell-input-tools .options {
    display: block;
  }

  &.code-cell .exec-info {
    display: block;
  }

  &.code-cell .cell-input {
    border-left: 1px solid @ui-border;
    border-right: 1px solid @ui-border;
    border-top: 1px solid @ui-border;
  }

  &.code-cell .cell-output {
    border: 1px solid @ui-border;
  }

  &.code-cell .cell-input .cell-input-editor {
    // making cell-input-editor content-editable means users can sometimes select it rather than the monaco editor itself.
    // we can make it unselectable by setting pointer-events (we then need to make its child selectable again)
    pointer-events: none;
    .monaco-editor {
      pointer-events: auto;
    }
  }

  &.scala .cell-input .cell-input-tools button.run-cell {
    background-image: url(icons/scala.png);
  }

  &.python .cell-input .cell-input-tools button.run-cell {
    background-image: url(icons/python.png);
  }

  &.hide-code .cell-input {
    .cell-input-editor {
      display: none;
    }

    .cell-footer {
      display: none !important;
    }

    .toggle-code {
      border: 1px solid @ui-border;
      background-color: white;
    }
  }

  &.hide-output {
    .cell-output .cell-output-block {
      display: none;
    }

    .cell-input .toggle-output {
      border: 1px solid @ui-border;
      background-color: white;
    }
  }

  &.text-cell {

    &.active {
      .cell-input {
        border-left-color: #f5f5f5;
        .markdown-body {
          border-left-color: #e1e1e1;
        }
      }

      .cell-input-tools {
        display: none;
        * {
          display: none;
        }
      }
    }

    .cell-input {
      grid-template-rows: auto;

      .cell-footer {
        display: none;
      }
    }

    .cell-input-tools {
      display: none;
    }

    .cell-input-editor {
      margin: 0;
      padding: 12pt 24pt;
      border: none;
      min-height: 1em;
    }

    .cell-output-container {
      display: none;
    }

    /** Replicate github doc style **/
    .markdown-body {
      -ms-text-size-adjust: 100%;
      -webkit-text-size-adjust: 100%;
      line-height: 1.5;
      color: #24292e;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
      font-size: 16px;
      word-wrap: break-word;
      border-left: 1px solid transparent;
      outline: none;
    }

    .markdown-body .pl-c {
      color: #6a737d;
    }

    .markdown-body .pl-c1,
    .markdown-body .pl-s .pl-v {
      color: #005cc5;
    }

    .markdown-body .pl-e,
    .markdown-body .pl-en {
      color: #6f42c1;
    }

    .markdown-body .pl-smi,
    .markdown-body .pl-s .pl-s1 {
      color: #24292e;
    }

    .markdown-body .pl-ent {
      color: #22863a;
    }

    .markdown-body .pl-k {
      color: #d73a49;
    }

    .markdown-body .pl-s,
    .markdown-body .pl-pds,
    .markdown-body .pl-s .pl-pse .pl-s1,
    .markdown-body .pl-sr,
    .markdown-body .pl-sr .pl-cce,
    .markdown-body .pl-sr .pl-sre,
    .markdown-body .pl-sr .pl-sra {
      color: #032f62;
    }

    .markdown-body .pl-v,
    .markdown-body .pl-smw {
      color: #e36209;
    }

    .markdown-body .pl-bu {
      color: #b31d28;
    }

    .markdown-body .pl-ii {
      color: #fafbfc;
      background-color: #b31d28;
    }

    .markdown-body .pl-c2 {
      color: #fafbfc;
      background-color: #d73a49;
    }

    .markdown-body .pl-c2::before {
      content: "^M";
    }

    .markdown-body .pl-sr .pl-cce {
      font-weight: bold;
      color: #22863a;
    }

    .markdown-body .pl-ml {
      color: #735c0f;
    }

    .markdown-body .pl-mh,
    .markdown-body .pl-mh .pl-en,
    .markdown-body .pl-ms {
      font-weight: bold;
      color: #005cc5;
    }

    .markdown-body .pl-mi {
      font-style: italic;
      color: #24292e;
    }

    .markdown-body .pl-mb {
      font-weight: bold;
      color: #24292e;
    }

    .markdown-body .pl-md {
      color: #b31d28;
      background-color: #ffeef0;
    }

    .markdown-body .pl-mi1 {
      color: #22863a;
      background-color: #f0fff4;
    }

    .markdown-body .pl-mc {
      color: #e36209;
      background-color: #ffebda;
    }

    .markdown-body .pl-mi2 {
      color: #f6f8fa;
      background-color: #005cc5;
    }

    .markdown-body .pl-mdr {
      font-weight: bold;
      color: #6f42c1;
    }

    .markdown-body .pl-ba {
      color: #586069;
    }

    .markdown-body .pl-sg {
      color: #959da5;
    }

    .markdown-body .pl-corl {
      text-decoration: underline;
      color: #032f62;
    }

    .markdown-body .octicon {
      display: inline-block;
      vertical-align: text-top;
      fill: currentColor;
    }

    .markdown-body a {
      background-color: transparent;
    }

    .markdown-body a:active,
    .markdown-body a:hover {
      outline-width: 0;
    }

    .markdown-body strong {
      font-weight: inherit;
    }

    .markdown-body strong {
      font-weight: bolder;
    }

    .markdown-body h1 {
      font-size: 2em;
      margin: 0.67em 0;
    }

    .markdown-body img {
      border-style: none;
    }

    .markdown-body code,
    .markdown-body kbd,
    .markdown-body pre {
      font-family: monospace, monospace;
      font-size: 1em;
    }

    .markdown-body hr {
      box-sizing: content-box;
      height: 0;
      overflow: visible;
    }

    .markdown-body input {
      font: inherit;
      margin: 0;
    }

    .markdown-body input {
      overflow: visible;
    }

    .markdown-body [type="checkbox"] {
      box-sizing: border-box;
      padding: 0;
    }

    .markdown-body * {
      box-sizing: border-box;
    }

    .markdown-body input {
      font-family: inherit;
      font-size: inherit;
      line-height: inherit;
    }

    .markdown-body a {
      color: #0366d6;
      text-decoration: none;
    }

    .markdown-body a:hover {
      text-decoration: underline;
    }

    .markdown-body strong {
      font-weight: 600;
    }

    .markdown-body hr {
      height: 0;
      margin: 15px 0;
      overflow: hidden;
      background: transparent;
      border: 0;
      border-bottom: 1px solid #dfe2e5;
    }

    .markdown-body hr::before {
      display: table;
      content: "";
    }

    .markdown-body hr::after {
      display: table;
      clear: both;
      content: "";
    }

    .markdown-body table {
      border-spacing: 0;
      border-collapse: collapse;
    }

    .markdown-body td,
    .markdown-body th {
      padding: 0;
    }

    .markdown-body h1,
    .markdown-body h2,
    .markdown-body h3,
    .markdown-body h4,
    .markdown-body h5,
    .markdown-body h6 {
      margin-top: 0;
      margin-bottom: 0;
    }

    .markdown-body h1 {
      font-size: 32px;
      font-weight: 600;
    }

    .markdown-body h2 {
      font-size: 24px;
      font-weight: 600;
    }

    .markdown-body h3 {
      font-size: 20px;
      font-weight: 600;
    }

    .markdown-body h4 {
      font-size: 16px;
      font-weight: 600;
    }

    .markdown-body h5 {
      font-size: 14px;
      font-weight: 600;
    }

    .markdown-body h6 {
      font-size: 12px;
      font-weight: 600;
    }

    .markdown-body p {
      margin-top: 0;
      margin-bottom: 10px;
    }

    .markdown-body blockquote {
      margin: 0;
    }

    .markdown-body ul,
    .markdown-body ol {
      padding-left: 0;
      margin-top: 0;
      margin-bottom: 0;
    }

    .markdown-body ol ol,
    .markdown-body ul ol {
      list-style-type: lower-roman;
    }

    .markdown-body ul ul ol,
    .markdown-body ul ol ol,
    .markdown-body ol ul ol,
    .markdown-body ol ol ol {
      list-style-type: lower-alpha;
    }

    .markdown-body dd {
      margin-left: 0;
    }

    .markdown-body code {
      font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
      font-size: 12px;
    }

    .markdown-body pre {
      margin-top: 0;
      margin-bottom: 0;
      font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
      font-size: 12px;
    }

    .markdown-body .octicon {
      vertical-align: text-bottom;
    }

    .markdown-body .pl-0 {
      padding-left: 0 !important;
    }

    .markdown-body .pl-1 {
      padding-left: 4px !important;
    }

    .markdown-body .pl-2 {
      padding-left: 8px !important;
    }

    .markdown-body .pl-3 {
      padding-left: 16px !important;
    }

    .markdown-body .pl-4 {
      padding-left: 24px !important;
    }

    .markdown-body .pl-5 {
      padding-left: 32px !important;
    }

    .markdown-body .pl-6 {
      padding-left: 40px !important;
    }

    .markdown-body::before {
      display: table;
      content: "";
    }

    .markdown-body::after {
      display: table;
      clear: both;
      content: "";
    }

    .markdown-body>*:first-child {
      margin-top: 0 !important;
    }

    .markdown-body>*:last-child {
      margin-bottom: 0 !important;
    }

    .markdown-body a:not([href]) {
      color: inherit;
      text-decoration: none;
    }

    .markdown-body .anchor {
      float: left;
      padding-right: 4px;
      margin-left: -20px;
      line-height: 1;
    }

    .markdown-body .anchor:focus {
      outline: none;
    }

    .markdown-body p,
    .markdown-body blockquote,
    .markdown-body ul,
    .markdown-body ol,
    .markdown-body dl,
    .markdown-body table,
    .markdown-body pre {
      margin-top: 0;
      margin-bottom: 16px;
    }

    .markdown-body hr {
      height: 0.25em;
      padding: 0;
      margin: 24px 0;
      background-color: #e1e4e8;
      border: 0;
    }

    .markdown-body blockquote {
      padding: 0 1em;
      color: #6a737d;
      border-left: 0.25em solid #dfe2e5;
    }

    .markdown-body blockquote>:first-child {
      margin-top: 0;
    }

    .markdown-body blockquote>:last-child {
      margin-bottom: 0;
    }

    .markdown-body kbd {
      display: inline-block;
      padding: 3px 5px;
      font-size: 11px;
      line-height: 10px;
      color: #444d56;
      vertical-align: middle;
      background-color: #fafbfc;
      border: solid 1px #c6cbd1;
      border-bottom-color: #959da5;
      border-radius: 3px;
      box-shadow: inset 0 -1px 0 #959da5;
    }

    .markdown-body h1,
    .markdown-body h2,
    .markdown-body h3,
    .markdown-body h4,
    .markdown-body h5,
    .markdown-body h6 {
      margin-top: 24px;
      margin-bottom: 16px;
      font-weight: 600;
      line-height: 1.25;
    }

    .markdown-body h1 .octicon-link,
    .markdown-body h2 .octicon-link,
    .markdown-body h3 .octicon-link,
    .markdown-body h4 .octicon-link,
    .markdown-body h5 .octicon-link,
    .markdown-body h6 .octicon-link {
      color: #1b1f23;
      vertical-align: middle;
      visibility: hidden;
    }

    .markdown-body h1:hover .anchor,
    .markdown-body h2:hover .anchor,
    .markdown-body h3:hover .anchor,
    .markdown-body h4:hover .anchor,
    .markdown-body h5:hover .anchor,
    .markdown-body h6:hover .anchor {
      text-decoration: none;
    }

    .markdown-body h1:hover .anchor .octicon-link,
    .markdown-body h2:hover .anchor .octicon-link,
    .markdown-body h3:hover .anchor .octicon-link,
    .markdown-body h4:hover .anchor .octicon-link,
    .markdown-body h5:hover .anchor .octicon-link,
    .markdown-body h6:hover .anchor .octicon-link {
      visibility: visible;
    }

    .markdown-body h1 {
      padding-bottom: 0.3em;
      font-size: 2em;
      border-bottom: 1px solid #eaecef;
    }

    .markdown-body h2 {
      padding-bottom: 0.3em;
      font-size: 1.5em;
      border-bottom: 1px solid #eaecef;
    }

    .markdown-body h3 {
      font-size: 1.25em;
    }

    .markdown-body h4 {
      font-size: 1em;
    }

    .markdown-body h5 {
      font-size: 0.875em;
    }

    .markdown-body h6 {
      font-size: 0.85em;
      color: #6a737d;
    }

    .markdown-body ul,
    .markdown-body ol {
      padding-left: 2em;
    }

    .markdown-body ul ul,
    .markdown-body ul ol,
    .markdown-body ol ol,
    .markdown-body ol ul {
      margin-top: 0;
      margin-bottom: 0;
    }

    .markdown-body li {
      word-wrap: break-all;
    }

    .markdown-body li>p {
      margin-top: 16px;
    }

    .markdown-body li+li {
      margin-top: 0.25em;
    }

    .markdown-body dl {
      padding: 0;
    }

    .markdown-body dl dt {
      padding: 0;
      margin-top: 16px;
      font-size: 1em;
      font-style: italic;
      font-weight: 600;
    }

    .markdown-body dl dd {
      padding: 0 16px;
      margin-bottom: 16px;
    }

    .markdown-body table {
      display: block;
      width: 100%;
      overflow: auto;
    }

    .markdown-body table th {
      font-weight: 600;
    }

    .markdown-body table th,
    .markdown-body table td {
      padding: 6px 13px;
      border: 1px solid #dfe2e5;
    }

    .markdown-body table tr {
      background-color: #fff;
      border-top: 1px solid #c6cbd1;
    }

    .markdown-body table tr:nth-child(2n) {
      background-color: #f6f8fa;
    }

    .markdown-body img {
      max-width: 100%;
      box-sizing: content-box;
      background-color: #fff;
    }

    .markdown-body img[align=right] {
      padding-left: 20px;
    }

    .markdown-body img[align=left] {
      padding-right: 20px;
    }

    .markdown-body code {
      padding: 0.2em 0.4em;
      margin: 0;
      font-size: 85%;
      background-color: rgba(27,31,35,0.05);
      border-radius: 3px;
    }

    .markdown-body pre {
      word-wrap: normal;
    }

    .markdown-body pre>code {
      padding: 0;
      margin: 0;
      font-size: 100%;
      word-break: normal;
      white-space: pre;
      background: transparent;
      border: 0;
    }

    .markdown-body .highlight {
      margin-bottom: 16px;
    }

    .markdown-body .highlight pre {
      margin-bottom: 0;
      word-break: normal;
    }

    .markdown-body .highlight pre,
    .markdown-body pre {
      padding: 16px;
      overflow: auto;
      font-size: 85%;
      line-height: 1.45;
      background-color: #f6f8fa;
      border-radius: 3px;
    }

    .markdown-body pre code {
      display: inline;
      max-width: auto;
      padding: 0;
      margin: 0;
      overflow: visible;
      line-height: inherit;
      word-wrap: normal;
      background-color: transparent;
      border: 0;
    }

    .markdown-body .full-commit .btn-outline:not(:disabled):hover {
      color: #005cc5;
      border-color: #005cc5;
    }

    .markdown-body kbd {
      display: inline-block;
      padding: 3px 5px;
      font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
      line-height: 10px;
      color: #444d56;
      vertical-align: middle;
      background-color: #fafbfc;
      border: solid 1px #d1d5da;
      border-bottom-color: #c6cbd1;
      border-radius: 3px;
      box-shadow: inset 0 -1px 0 #c6cbd1;
    }

    .markdown-body :checked+.radio-label {
      position: relative;
      z-index: 1;
      border-color: #0366d6;
    }

    .markdown-body .task-list-item {
      list-style-type: none;
    }

    .markdown-body .task-list-item+.task-list-item {
      margin-top: 3px;
    }

    .markdown-body .task-list-item input {
      margin: 0 0.2em 0.25em -1.6em;
      vertical-align: middle;
    }

    .markdown-body hr {
      border-bottom-color: #eee;
    }

  }

  .cell-output {
    grid-area: output;

    .cell-output-margin {
      background: @ui-background;
    }

    .cell-output-block {
      display: block; // must be block for performance reasons.
    }

    .cell-output-container {
    }

    .errors, .output {
      display: inherit !important;
    }

    .output[mime-type='text/plain'] {
      white-space: pre;
      line-height: 1.5;
      font-family: @code-fonts;
      font-size: 11pt;
    }

    .output[rel=stdout] {
      font-variant-ligatures: none;
    }

    .output[rel='stderr'] {
      color: #884444
    }

    .output[rel='stdout'] {

      details {
        position: relative;

        summary {
          margin-left: -.75em;
          outline: none;
          span {
            position: absolute;
            left: 0;
          }

          span::after {
            content: "(" attr(line-count) " lines hidden; click to show)";
            color: gray;
          }
        }
      }

      details[open] {
        summary {
          position: absolute;
          span {
            display: none
          }
          span::after {
            display: none;
          }
        }
      }
    }

    .cell-result-margin {
      background: @ui-background;
    }

    .cell-output-tools {
      display: none;
      position: relative;
      min-height: @tab-view-height;
      overflow: auto;

      grid-area: results;


      .tab-container {
        border-right: 0px;
      }

      .repr-ui {
        //padding: 0.5em 1em;
      }

      .repr-ui-content .output {
        padding-left: 2em;
      }

      .output {
        padding: 1em 2em;
      }

    }

    .out-ident {
      color: #D84315;
      font-family: @code-fonts;
      font-size: 11pt;
      border-bottom: 1px solid @ui-border;
      padding: .25em 0 .25em 32pt;
      position: relative;
    }

    .cell-output-display {
      display: none;
      padding-top: 0.5em;
      padding-bottom: 0.5em;
      margin-bottom: 1em;
      overflow: auto;
      resize: vertical;
      position: relative;
      //background-color: @ui-background;

      .output {
        padding-left: 2em;
      }

      .errors {
        padding-left: 1em;
        padding-right: 1em;
      }

      ul.stack-trace {
        margin: 0 0 0 .5em;

        li {
          list-style: none;
        }

        li.irrelevant {
          display: none;
        }

        li::before {
          content: 'at ';
        }
      }

      .error-report {
        /*background: url(icons/error.png) no-repeat 1em 1em;*/
        background-color: #ffeef0;
        border-radius: 4px;
        border: 1px solid #cc0000;
        padding: 1em;
        margin: 1em 0;
        .severity {
          &:after {
            content: ': '
          }
          font-weight: bold;
        }

        .message {
          padding-right: 1em;
        }

        .error-link {
          color: #005cc5;
          text-decoration: underline;
          cursor: pointer;
        }
      }

      .error-report.Warning {
        color: #8a6d3b;
        background-color: #fcf8e3;
        border-color: #faebcc;
      }
    }
  }
}

.vim-enabled.cell-container.code-cell .cell-input .cell-footer {
  display: grid;
  height: 1.5em;
}

button {

  padding: 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  /*background-color: @ui-background;*/
  background-color: transparent;
  background-position: right bottom;
  background-repeat: no-repeat;
  background-size: 12px 12px;
  text-align: center;
  line-height: 1;
  vertical-align: middle;

  opacity: 0.7;

  &:hover, &:focus, &.selected, &.active {
    border-color: @ui-border;
    background-color: @ui-background-bright;
    outline: 0;
    opacity: 1.0;
  }

  &:active {
    background-color: @ui-background-dark;
    border-color: @ui-border-dark;
    outline: 0;
  }

  &:disabled {
    pointer-events:none;
    .icon {
      color: gray;
    }
  }
}

button.inspect.icon-button {
  padding: 1pt 0 0;
  background: transparent !important;
  border: none !important;
  position: absolute;
  left: 14pt;
}

.monaco-editor button.inspect.icon-button {
  font-size: 7pt;
  opacity: 0.2;
}

.monaco-editor button.inspect.icon-button:hover {
  opacity: 1.0;
}

.run-cell .icon {
  //font-size: 16px;
  color: green;
}

.stop-cell .icon {
  color: #aa0000;
}

.dependencies .icon {
  transform: scale(1, -1);
}

.insert-cell-above .icon, .insert-cell-below .icon {
  position: relative;
  //font-size: 16px;

  //&:after {
  //  position: absolute;
  //  content: '';
  //  right: -6px;
  //  top: -6px;
  //  font-size: 10px;
  //  color: green;
  //}
}

.insert-cell-above .icon {
  border-top: 3px solid green;
}

.insert-cell-below .icon {
  border-bottom: 3px solid green;

  &:after {
    top: auto;
    bottom: -6px;
  }
}

.notebook-ui {
  position: absolute;
  top: 69px;
  bottom: 0;
  left: 0;
  right: 0;
}

.notebook-content {
  overflow-y: auto;
  padding: 2px;
  border-left: 1px solid @ui-border;
  border-right: 1px solid @ui-border;
  border-bottom: 1px solid @ui-border;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 1.0;
  }
}

.ui-panel {
  h2, h3 {
    font-size: 100%;
    margin: 0;
    padding: .5em;

    line-height: 1;
    grid-area: head;
    font-weight: normal;
  }

  & > h2 {
    background-color: @ui-sidebar-header;
    grid-area: head;
    position: relative;
    .buttons {
      position: absolute;
      right: 0;
      top: .1em;
      bottom: .1em;
      line-height: 1.8em;
      vertical-align: middle;
      text-align: right;
      padding-right: .25em;

      button.icon-button {
        font-size: inherit;
        padding: 2px;
        box-sizing: border-box;
        display: inline-block;
        width: 1.7em;
        height: 1.7em;
        margin: -1px .25em 0;
        vertical-align: middle;

        button.icon-button .icon {
          font-size: 16px;
        }
      }
    }
  }

  h3 {
    background-color: @ui-background-dark;
  }


  grid-template-areas: "head" "body";
  grid-template-rows: 2em 1fr;
  display: grid;
  width: 100%;

  .ui-panel-content {
    display: inline-block;
    grid-area: body;
    overflow-y: auto;
  }
}

.kernel-ui {
  background-color: @ui-background;
  border-left: 1px solid @ui-border;

  max-height: 100%;
  width: 100%;

  > .ui-panel-content {
    grid-template-areas: "info" "symbols" "tasks";
    grid-template-rows:   auto   auto      1fr;
  }

  h2 {
    position: relative;
    padding-left: 0;

    .start {
      display: none !important;
    }
  }


  .kernel-tasks {
    grid-area: tasks;
    .task {
      border: 1px solid #eeeeee;
      border-radius: 6px;
      box-shadow: 1px 1px 3px rgba(0,0,0,0.4);
      box-sizing: border-box;
      padding: 8px;
      margin: 4px 0;
      background: white;
      white-space: pre-line;

      h4 {
        margin-top: 0;
      }

      .progress {
        background: #eeeeee;
        height: 4px;
        margin-top: 1em;

        .progress-bar {
          background-color: #005cc5;
          height: 4px;
        }
      }

      &.queued {
        opacity: 0.6;
        .progress {
          display: none;
        }

        .detail:after {
          content: '(Queued)';
          display: block;
          margin-top: 1em;
        }
      }

      &.error {
        .progress {
          display: none;
        }

        background-color: #ffeef0;
        border: 1px solid #cc0000;
      }

      .child-tasks {
        &:empty {
          display: none;
        }
        padding: .5em 0 0;
        margin-top: .5em;
        border-top: 1px dotted @ui-border-light;

        .task {
          display: none;
          height: 1.2em;
          &.running {
            display: block;
          }

          border: none;
          background: transparent;
          box-shadow: none;
          padding: 0;
          margin: 0;
          position: relative;

          h4 {
            font-size: 100%;
            font-weight: 400;
            line-height: 1.2;
            width: 50%;
            position: absolute;
            left: 0;
            top: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }

          .detail { display: none; }

          .progress {
            position: absolute;
            right: 0;
            top: 50%;
            width: 50%;
            margin-top: -2px;
          }
        }
      }
    }

    /*.task.complete {
      animation: 1s fadeOut;
      animation-fill-mode: forwards;
      overflow: hidden;
      padding-top: 0;
      padding-bottom: 0;
      transition-delay: 1s;
      transition-property: height, padding-top, padding-bottom;
      transition-duration: 0.5s;
    }*/
  }

  .kernel-symbols {
    position: relative;
    grid-area: symbols;

    tbody tr {
      cursor: zoom-in;
    }
  }

  .kernel-info {
    position: relative;
    grid-area: info;
    /*z-index: 1;*/

    .toggle {
      float: right;
      cursor: default;
    }

    .collapsed {
      background-color: lightgrey;
      box-shadow: 4px 0px 0px #e0e6ec inset;
    }

    .info-container {
      background-color: white;
      width: 100%;
      table-layout: fixed;

      tbody {
        background: white;
      }

      td {
        text-align: left;
        overflow: hidden;
        word-break: break-all;
        white-space: nowrap;
        text-overflow: ellipsis;

        &.val {
          padding-left: 4px;
        }
        &.key {
          width: 40%;
        }
      }
    }
  }
}

.kernel-status {
  .status {
    color: gray;
    font-size: 200%;
    line-height: 0.5;
    vertical-align: middle;
    margin: 0 .125em;
  }

  &.idle {
    .status {
      color: green;
    }

    .connect, .start {
      display: none !important;
    }
  }

  &.busy {
    .status {
      color: gold;
    }

    .connect, .start {
      display: none !important;
    }
  }

  &.dead {
    .status {
      color: #AA0000;
    }

    .connect, .kill {
      display: none !important;
    }

    .start {
      display: inline-block !important;
    }
  }

  &.disconnected {
    .kill, .start {
      display: none !important;
    }
  }
}

.drag-handle {
  position: relative;
  border-left: 1px solid @ui-background;
  .inner {
    position: absolute;
    left: -2px;
    right: -2px;
    top: 0;
    bottom: 0;
    cursor: col-resize;
  }
}

.notebook-config {
  border-radius: 6px;
  background-color: @ui-background;
  padding: 1em;
  /*margin: 1em;*/
  color: @ui-background-dark;

  &.open {
    color: #333333;
  }

  h2 {
    font-size: 100%;
    margin: 0;
  }

  h2:before {
    content: '▶';
    width: 1.5em;
    display: inline-block;
  }

  &.open h2:before {
    content: '▼';
  }

  h3 {
    font-size: 100%;
  }

  .pre {
    font-family: monospace, monospace;
  }

  .content {
    display: none;
    font-size: 86%;
    margin: 0 1.75em;
  }

  &.open .content {
    display: block;
  }

  .notebook-config-section {
    border-radius: 4px;
    border: 1px solid @ui-border;
    border-left-width: 6px;
    padding: 1em;
    margin: 1em 0;
  }

  .notebook-config-row .add {
    display: none;
  }

  .notebook-config-row:last-child .add {
    display: inline-block;
  }

  //.notebook-config-row:last-child .remove {
  //  display: none;
  //}

  .notebook-config-row {
    button {
      padding: 4px;
    }

    input {
      padding: 4px;
    }
  }

  .dependency-row {
    input {
      width: 40em;
    }
  }

  .spark-config-row {
    input {
      width: 30em;
    }
  }

  .exclusion-row {
    input {
      width: 20em;
    }
  }

  .resolver-row {
    display: grid;
    grid-template-columns: 7em 2fr 1fr 1fr 32px 32px;

    select {
      width: 7em;
    }

    input.ivy {
      display: none;
    }
  }

  .resolver-row.ivy {
    input.ivy {
      display: block;
    }
  }

  .add .icon {
    color: green;
    font-size: 16px;
  }

  .remove .icon {
    color: red;
    font-size: 16px;
  }
}

button {
  text-align: center;
  font-size: 16px;
  .alt { display: none; }
}

.grid-shell {
  display: flex;
  flex-direction: row;
  position: relative;
  background-color: @ui-background;
}

.split-view {
  position: absolute;
  top: 68px;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-areas: "left leftdrag center rightdrag right";
  grid-template-columns: max-content 1px auto 1px max-content;
  grid-template-rows: 100%;
  overflow: hidden;

  &.right-collapsed {
    grid-template-columns: max-content 1px auto 1px 2em;

    .right .ui-panel {
      width: 0;
      border: unset;
      
      h2 {
        transform: translateY(-100%) rotate(90deg);
        transform-origin: bottom left;
        width: fit-content;
        &:hover {
          background-color: @ui-background-accent;
        }

        .buttons {
          display: none;
        }
      }

      .ui-panel-content {
        display: none;
      }
    }

    .drag-handle.right .inner {
      display: none;
    }

    .grid-shell.right {
      background-color: @ui-sidebar-header;
      width: unset !important;
    }
  }

  &.left-collapsed {
    grid-template-columns: 2em 1px auto 1px max-content;

    .left {

      .ui-panel {
        width: 0;
        border: unset;

        h2 {
          transform: translateY(-100%) rotate(90deg);
          transform-origin: bottom left;
          width: fit-content;

          &:hover {
            background-color: @ui-background-accent;
          }

          .buttons {
            display: none;
          }
        }

        .ui-panel-content {
          display: none;
        }

      }

    }

    .drag-handle.left .inner {
      display: none;
    }

    .grid-shell.left {
      background-color: @ui-sidebar-header;
      width: unset !important;
    }
  }

  &.left-collapsed.right-collapsed {
    grid-template-columns: 2em 1px auto 1px 2em;
  }
}

.tab-view {
  display: grid;
  grid-template-rows: auto 1fr;

  .tab-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    //border: 1px solid @ui-border;
    background: @ui-background;
    padding-top: 2px;

    &:last-child:after {
      border-bottom: 1px solid @ui-border;
      content: "";
      width: 100%;
    }

    &:not(:first-child):before {

    }

    .tab {
      border-right: 1px solid @ui-border;
      border-bottom: 1px solid @ui-border;
      border-top: 1px solid @ui-border;

      background: @ui-background-dark;
      display: grid;
      grid-template-columns: 1fr 1.5em;
      flex-shrink: 0;

      user-select: none;

      span {
        padding: .25em;
        text-overflow: ellipsis;
      }

      .close-button {
        opacity: 0.8;
      }

      &:first-child {
        border-left: 1px solid@ui-border;
      }
      &:last-child {
        border-right: 1px solid @ui-border;
      }
    }

    .tab.active {
      background: white;
      border-bottom: none;
    }
  }
}

.tree-view {

  ul {
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 22px;
    vertical-align: middle;
    li {
      user-select: none;
      cursor: pointer;
      padding: 0 1em 0 0;
      position: relative;
      ul {
        margin-left: 24px;
        display: none;
      }

      span, a {
        white-space: nowrap;
        color: @ui-text;
        text-decoration: none;
      }
    }

    li.leaf > span, li.leaf a {
      background: transparent url(icons/book.png) no-repeat 18px 2px;
      padding-left: 36px;
      display: block;
      outline: none;
    }

    li.leaf a:focus span {
      background-color: @ui-selected;
      outline: 1px dotted black;
      color: white;
    }

    li.branch {
      position: relative;
      .branch-outer {
        padding: 0;
        border: none;
        opacity: 1;
        color: @ui-text;
        font-size: 100%;
        line-height: 22px;
        background: transparent;
        border-radius: 0;

        .expander {
          position: absolute;
          left: 0;
          top: 3px;
          width: 16px;
          height: 16px;
          background: transparent url(icons/bullet_toggle_plus.png) no-repeat left top;
        }

        .icon {
          position: absolute;
          left: 16px;
          top: 3px;
          width: 16px;
          height: 16px;
          background: transparent url(icons/folder.png) no-repeat left top;
        }

        .name {
          margin-left: 36px;
        }


        &:focus {
          .name {
            background-color: @ui-selected;
            color: white;
            outline: 1px dotted black;
          }
        }
      }
    }

    li.branch.expanded {
      & > ul {
        display: block;
      }

      .expander {
        background-image: url(icons/bullet_toggle_minus.png);
      }
    }

    li.branch.expanded::before {
      position: absolute;
      left: 24px;
      top: 8px;
      bottom: 8px;
      content: ' ';
      border-left: 1px dotted black;
    }

    li.branch.expanded > ul > li::before {
      content: ' ';
      position: absolute;
      left: 0;
      top: 13px;
      width: 16px;
      border-bottom: 1px dotted black;
    }
  }
}

.notebooks-list {
  position: relative;
  border: 1px solid @ui-border;
  overflow: auto;

  .tree-view {
    padding: .5em 0 1.5em;
  }

  .ui-panel-content {
    background: white;
  }

  &.highlight {
    .tree-view {
      border: 5px dashed green;
      border-radius: 10px;
      transition: border 200ms;
      ul {
        filter: blur(2px);
        opacity: 0.5;
        transition: all 200ms;
      }
    }
  }
}

.notebook-list-context-menu {
  position: absolute;
  background: @ui-background;
  border: 1px solid @ui-border;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);

  ul {
    list-style: none;
    margin: 0;
    padding: 0;

    li {
      padding: .5em 1em;
      color: @ui-text;
      cursor: default;
      &:hover {
        background: @ui-selected;
        color: white;
      }
    }

    li.only-item {
      display: none;
    }

    li.only-item.only-dir, li.only-item.only-file {
      display: none;
    }
  }

  &.for-file {
    ul li.only-item.only-file {
      display: block;
    }

    ul li.no-file {
      display: none;
    }
  }

  &.for-dir {
    ul li.only-item.only-dir {
      display: block;
    }
  }
}

button.dialog-button {
  border-color: @ui-border;
  background-color: @ui-background;
  opacity: 1;
  border-radius: 3pt;
  user-select: none;
  &:active {
    background-color: @ui-background-dark;
    padding: 9px 7px 7px 9px;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
  }
}

.input-dialog {
  background: @ui-background;
  border: 1px solid @ui-border;
  min-width: 30em;
  padding: 1em;

  input {
    font-size: 100%;
    width: 100%;
  }

  .buttons {
    text-align: right;
    padding: .5em 0;

  }
}

.left-collapsed .notebooks-list {
  overflow: visible;
}

.create-notebook {
  color: green;
}

.notebook-cells {
  position: relative;
  padding: 12pt;
}

.latex-editor {
  position: absolute;

  .pointer {
    position: absolute;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #6a737d;
  }

  .bubble {
    background: #6a737d;
    position: absolute;
    top: 10px;
    border-radius: 12px;
    left: 0;
    right: 0;
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-row-gap: 1em;
    padding: 1em;

    .tex-display {
      background: white;
      padding: 1em;
      border: 1px solid black;
      border-radius: 2px;
    }

    input {
      width: available;
      font-family: @code-fonts;
      font-size: inherit;
    }
  }
}

.katex, .katex-block {
  user-select: all;
}

.result {
  caption {
    padding: 10px;
    caption-side: bottom;
  }

  table {
    border-collapse: collapse;
    border: 2px solid rgb(200, 200, 200);
    letter-spacing: 1px;
    font-family: sans-serif;
    font-size: .8rem;
  }

  td,
  th {
    border: 1px solid rgb(190, 190, 190);
    padding: 7px 5px;
  }

  th {
    background-color: rgb(235, 235, 235);
  }

  td {
    text-align: center;
  }

  tr:nth-child(even) td {
    background-color: rgb(250, 250, 250);
  }

  tr:nth-child(odd) td {
    background-color: rgb(240, 240, 240);
  }

}

.welcome-page {
  font-size: 12pt;
  padding: 2em;
  line-height: 1.5;

  .recent-notebooks li {
    span {
      color: blue;
      text-decoration: underline;
      cursor: pointer;
    }
  }
}

.kernel-ui .kernel-symbols table,
.table-view table {
  width: 100%;
  border-collapse: collapse;
  border-width: 1px 0;

  th, td {
    border: 1px solid @ui-border;
    padding: 0.25em;
    font-weight: normal;
  }

  th:first-child, td:first-child {
    border-left-width: 0;
  }

  th:last-child, td:last-child {
    border-right-width: 0;
  }

  thead {
    th {
      background: @ui-background;
      text-align: left;
    }
  }
  tbody {
    &.results {
      border-bottom: 2pt solid black;
    }

    overflow-y: auto;
    background: white;

    tr {
      animation: highlight 2s;
    }

    tr.initial-msg {
      td {
        text-align: center;
        vertical-align: middle;
        height: 10em;
        span {
          display: inline;
          color: black;

        }
      }
    }

    th, td {
      text-align: left;
      line-height: 1.2;

      span {
        display: block;
        max-height: 1.2em;
        position: relative;
        overflow: hidden;
        color: transparent;
        word-break: break-all;
      }

      span::after {
        content: attr(title);
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: black;
      }
    }

    .name, .type {
      font-family: @code-fonts;
    }
  }
}

.plot-editor {
  background: @ui-background;
  display: grid;
  border: 1px solid @ui-border;
  grid-template-areas: "controls plot";
  grid-template-columns: 1fr 4fr;
  padding: 8px;
  .selected-measure {
    display: grid;
    grid-template-columns: 6.5em auto;
    position: relative;
    line-height: 2;
    vertical-align: middle;
    .dropdown {
      position: absolute;
      width: 6.5em;
    }

    .dropdown.open {
      z-index: 10;
    }
  }

  .left-controls {
    grid-area: controls;
    display: grid;
    overflow-y: auto;
    grid-template-areas: "plot-type-title" "plot-type" "plot-size-title" "plot-size" "measure-title" "measure-list" "dimension-title" "dimension-list" "control-buttons";
    grid-template-rows: 2em 2em 2em 2em 2em auto 2em auto 2.5em;
    min-width: 20em;
    &.numeric-fields {
      grid-template-areas: "plot-type-title" "plot-type" "plot-size-title" "plot-size" "numeric-field-title" "numeric-field-list" "dimension-title" "dimension-list" "control-buttons";
      .numeric-field-title, .numeric-field-list {
        display: block;
      }

      .measure-title, .measure-list {
        display: none;
      }
    }

    h4 {
      margin: 0;
      padding: .5em .25em 0 .25em;
      line-height: 1.5em;
      position: relative;

      button.add {
        color: green;
        position: absolute;
        right: 0;
        bottom: 4px;
        padding: 0;
        background-color: transparent;
        border: none;
      }
    }

    .plot-type-selector {
      grid-area: plot-type;
      position: relative;
      z-index: 4;
    }

    .plot-type-title {
      grid-area: plot-type-title;
    }

    .plot-size-title {
      grid-area: plot-size-title;
    }

    .plot-size {
      grid-area: plot-size;
      display: grid;
      grid-template-columns: 1fr 1em 1fr;
      span {
        line-height: 2em;
        text-align: center;
      }
    }

    .dimension-title {
      grid-area: dimension-title;
    }

    .dimension-list {
      grid-area: dimension-list;
      border: 1px solid @ui-border;
      background: white;

      .dimension {
        clear: left;
      }
    }

    .measure-title {
      grid-area: measure-title;
    }

    .measure-list {
      grid-area: measure-list;
    }

    .measure-list, .numeric-field-list {
      border: 1px solid @ui-border;
      background: white;

      .measure, .numeric {
        clear: left;
      }
    }

    .control-buttons {
      padding: 2pt 0;
      grid-area: control-buttons;
      text-align: right;
      button {
        font-size: inherit;
      }

      button.plot .icon {
        color: green;
        margin-right: 2pt;
      }

      button.cancel {
        display: none;
        .icon {
          color: red;
          margin-right: 2pt;
        }
      }
    }

    .numeric-field-title {
      grid-area: numeric-field-title;
      display: none;
    }

    .numeric-field-list {
      grid-area: numeric-field-list;
      display: none;
    }

  }

  .measure, .dimension, .numeric {
    float: left;
    width: auto;
    margin: 2pt;
    padding: 2pt;
    border: 1px solid @ui-border;
    background: @ui-background;
  }

  .measure .measure-name {
    padding: 0 .5em;
    min-width: 3em;
  }

  .plot-area {
    min-height: 30em;
    grid-area: plot;
    /*display: grid;
    grid-template-areas: 'y-axis-drop plot-output' 'empty x-axis-drop';
    grid-template-rows: auto 2.5em;
    grid-template-columns: 2.5em auto;*/
    display: flex;
    align-items: center;
    justify-items: center;
    overflow: auto;

    input {
      font-size: 14pt;
      width: 24em;
      text-align: center;
      display: block;
      margin: 2px auto;
      background: transparent;
      border: none;
      border-bottom: 1px dotted @ui-border;
      padding: 4px;
    }

    .nonempty .placeholder { display: none; }

    .plot-title {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 100%;
    }

    .x-axis-drop {
      text-align: center;
      line-height: 2em;
      position: absolute;
      left: 0;
      right: 0;
      top: 100%;
      height: 4.5em;

      .dimension, .numeric {
        float: none;
        display: inline-block;
      }
    }

    .y-axis-drop {
      position: absolute;
      right: 100%;
      top: 0;
      bottom: 0;
      width: 4.5em;

      .label {
        transform: rotate(-90deg) translate(-50%, 0);
        transform-origin: left top;
        white-space: nowrap;
        display: block;
        position: absolute;
        top: 50%;
        line-height: 2em;
        text-align: center;

        .measure, .numeric {
          padding: 0 2pt;
          float: none;
          display: inline-block;
          margin: 0;
          line-height: 1.5em;
          button {
            padding: 1pt;
            margin-left: 2pt;
            color: red;
          }
        }
      }
    }

    .plot-output {
      background: white;
      border: 1px solid @ui-border;
      margin: 0 auto;
      position: relative;

      .plot-embed {
        margin: 0 auto;
      }
    }

    .drop-ok {
      background: #eeffee;
    }

    .drop-disallowed {
      background: #ffeeee;
    }
  }

  &.running {
    .left-controls .control-buttons {
      button.plot {
        display: none;
      }

      button.cancel {
        display: inline-block;
      }
    }

  }
}

.undo-delete {
  padding: .5em;
  text-align: center;
  background: rgb(253, 246, 228);
  border-radius: 1em;
  position: relative;

  .undo-link {
    color: #268bd2;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
  }

  .close-button {
    position: absolute;
    right: 1em;
    cursor: pointer;
  }
}

.currently-executing {
  background-color: #d9edf7;
}

.link-highlight {
  background-color: @line-highlight-color;
}

.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 11pt;
  z-index: 99;

  .modal-background {
    background-color: rgba(0, 0, 0, 0.3);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    margin: 0 auto;
  }

  .modal-window {
    position: relative;
    display: grid;
    grid-template-rows: 24pt 1fr;

    &.full-screen {
      width: 90%;
      height: 90%;
    }

    .modal-titlebar {
      font-size: 12pt;
      padding: .5em;
      border-top-left-radius: 5pt;
      border-top-right-radius: 5pt;
      border: 1px solid @ui-border;
      background: linear-gradient(0, @ui-background-dark, @ui-background-bright);
      position: relative;

      .modal-titlebar-controls {
        position: absolute;
        right: 0;
        top: 0;

        .modal-close {
          color: red;
          margin: 6px;
          border: none;
          background: transparent;
          padding: 0;
        }
      }
    }

    .modal-content {
      border: 1px solid @ui-border;
      background: @ui-background;
      display: contents;
    }
  }
}

.value-inspector {
  .modal-content {
    .disconnected {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100%;
    }

    .tab-nav-content {
      overflow: auto;
      padding: 4px;

      .plaintext, .htmltext {
        padding: 2em;
      }

      .plaintext {
        font-family: monospace;
      }

      .plot-editor-container {
        height: 100%;
      }

      .plot-editor {
        height: 100%;
        box-sizing: border-box;
      }
    }
  }
}

.result-name-and-type {
  font-family: @code-fonts;
  font-weight: 400;
  margin: 0;
  button {
    padding: 2px;
    font-size: 10pt;
  }
  button:first-of-type {
    margin-left: 10pt;
  }
}

.schema-display {

  .object-fields .object-field {
    .field-name::after {
      content: none;
    }
  }

}

.tab-nav {
  display: grid;
  grid-template-columns: max-content 1fr;
  overflow: auto;

  .tab-nav-items {
    background: @ui-background;
    border-right: 1px solid @ui-border;

    .tab-nav-item {
      padding: 1em 2em;
      width: 100%;
      box-sizing: border-box;
      margin-left: 1px;
      border: 1px solid transparent;
      cursor: pointer;
    }

    .tab-nav-item.active {
      background: white;
      border-right: 1px solid white;
      border-top: 1px solid @ui-border;
      border-bottom: 1px solid @ui-border;
    }

    .tab-nav-item.active:first-child {
      border-top: 1px solid white;
    }
  }

  .tab-nav-content {
    background: white;
  }
}

.object-display {
  font-family: @code-fonts;

  .object-summary {

    .summary-content {
      &::before {
        content: '{ ';
      }

      &::after {
        content: ' }';
      }

      span::after {
        content: ', ';
      }

      span.string::after {
        content: '", ';
      }

      span:last-child::after {
        content: none;
      }

      span.string:last-child::after {
        content: '"';
      }
    }
  }

  .field-name {
    color: #892093;
    font-weight: bold;
  }

  .field-name::after {
    content: ': ';
  }

  .string {
    color: #c42426;
  }

  .string::before, .string::after {
    color: #c42426;
    content: '"';
  }
  .number, .boolean {
    color: #2321CC;
  }

  ul {
    list-style: none;
    margin: 0;
    padding: 0 0 0 2em;

    summary {
      text-indent: -1em;
    }
  }
}

.modal-window.about {
  line-height: 2;

  .tab-nav-content {
    padding: 2em;
  }

  table {
    font-family: monospace;

    td {
      padding: 0.5em 2em;
    }
  }

  .about-display img {
    float: right;
  }

  .preferences-storage {
    button {
      opacity: inherit;
      border: 1px solid @ui-background-dark;

      &.clear {
        margin-top: 1em;
      }

      &:hover {
        background: @ui-background;
      }
    }

    .storage {
      background: @ui-background;
      border-radius: 6px;
      padding: 1em;

      .json {
        word-break: break-word;
      }
    }
  }

  .kernels {
    .kernel-status .status {
      font-size: inherit;
      line-height: inherit;
      vertical-align: inherit;
    }
  }
}

@keyframes highlight {
  from {
    background-color: rgba(253, 246, 227, 1.0);
  }

  50% {
    background-color: @line-highlight-color;
  }

  to {
    background-color: rgba(253, 246, 227, 0.0);
  }
}

img.icon {
  height: 1em;
}